package com.igeek.service;

import com.igeek.dao.CategoryDao;
import com.igeek.domain.Category;

import java.sql.SQLException;
import java.util.List;

public class CategoryService {
    private CategoryDao categoryDao=new CategoryDao();

    public List<Category> getAllCategory(){
        try {
            return categoryDao.findAllCategory();
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
